import configObj from "./config"  //全局变量配置
import utils from  "@/utils"

import uviewPlus from 'uview-plus'
import { createPinia } from 'pinia'

import piniaPersist from 'pinia-plugin-persist-uni'
const pinia = createPinia()
pinia.use(piniaPersist)

import { createSSRApp } from "vue";
import App from "./App.vue";

export function createApp() {
	
  const app = createSSRApp(App)
  app.use(uviewPlus)
  app.use(createPinia()) //创建pinia实例
  app.use(pinia)  //添加pinia持久化插件
  app.use(utils)
  
  
  app.config.globalProperties.$globalConfig=configObj //全局配置

  return {
    app,
  };
}
